interface IAnima{
    void bark();
    void eat();
    void go();
}
class Dog implements IAnima{
    String name;
    Dog(String name){
        this.name = name;
    }
    @Override
    public void bark() {
        System.out.println(name + "汪汪汪");
    }

    @Override
    public void eat() {
        System.out.println("吃" + name + "粮");
    }

    @Override
    public void go() {
        System.out.println(name + "奔跑");
    }
}
public class test2 {
    public static void main(String[] args) {
        Dog dog1 = new Dog("馒头");
        dog1.bark();
        dog1.go();
        dog1.eat();
    }
}

